using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region Worker

	/// <summary>
	/// Worker object for NHibernate mapped table 'Worker'.
	/// </summary>
	public class Worker
	{
		#region Member Variables
		
		protected int _id;
		protected string _userName;
		protected string _userPass;
		protected string _realName;
		protected string _userImg;
		protected string _description;
		protected string _contents;
		protected bool _state;
		protected int _role;
		protected DateTime _addDate;
		protected string _userEmail;
		protected string _userLink;

		#endregion

		#region Constructors

		public Worker() { }

		public Worker( string userName, string userPass, string realName, string userImg, string description, string contents, bool state, int role, DateTime addDate, string userEmail, string userLink )
		{
			this._userName = userName;
			this._userPass = userPass;
			this._realName = realName;
			this._userImg = userImg;
			this._description = description;
			this._contents = contents;
			this._state = state;
			this._role = role;
			this._addDate = addDate;
			this._userEmail = userEmail;
			this._userLink = userLink;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual string UserName
		{
			get { return _userName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserName", value, value.ToString());
				_userName = value;
			}
		}

		public  virtual string UserPass
		{
			get { return _userPass; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserPass", value, value.ToString());
				_userPass = value;
			}
		}

		public  virtual string RealName
		{
			get { return _realName; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for RealName", value, value.ToString());
				_realName = value;
			}
		}

		public  virtual string UserImg
		{
			get { return _userImg; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserImg", value, value.ToString());
				_userImg = value;
			}
		}

		public  virtual string Description
		{
			get { return _description; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for Description", value, value.ToString());
				_description = value;
			}
		}

		public  virtual string Contents
		{
			get { return _contents; }
			set
			{
				if ( value != null && value.Length > 4000)
					throw new ArgumentOutOfRangeException("Invalid value for Contents", value, value.ToString());
				_contents = value;
			}
		}

		public  virtual bool State
		{
			get { return _state; }
			set { _state = value; }
		}

		public  virtual int Role
		{
			get { return _role; }
			set { _role = value; }
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		public  virtual string UserEmail
		{
			get { return _userEmail; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserEmail", value, value.ToString());
				_userEmail = value;
			}
		}

		public  virtual string UserLink
		{
			get { return _userLink; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for UserLink", value, value.ToString());
				_userLink = value;
			}
		}

		

		#endregion
	}
	#endregion
}